import React, { useEffect } from 'react'
import { Button, List } from 'antd-mobile'
import { AuthRoute } from '../web/auth';
import { useNavigate } from 'react-router-dom';
import { PayCircleOutline, SetOutline, UnorderedListOutline } from 'antd-mobile-icons';
import { webSend } from '../web/util';

export const MinePage: React.FC<{}> = ({ }) => {
  const navigate = useNavigate()

  useEffect(() => {
    webSend('HAS_BACK', false)
  }, [])
  return <AuthRoute>
    <div className='flex flex-col h-full'>
      <Button onClick={e => {
        navigate('/autojs/core/mobile/kwai')
      }}>快手</Button>

      <List header='我的'>
        <List.Item prefix={<UnorderedListOutline />} onClick={() => {
          navigate('/autojs/core/mobile/mine-device')
        }}>
          我的设备
        </List.Item>
        <List.Item prefix={<PayCircleOutline />} onClick={() => {
          navigate('/autojs/core/mobile/mine-money')
        }}>
          收益明细
        </List.Item>
        <List.Item prefix={<SetOutline />} onClick={() => {
          navigate('/autojs/core/mobile/mine-setting')
        }}>
          基础设置
        </List.Item>
      </List>
    </div>
  </AuthRoute>
}
